<?php
use \sy\base\Router;
use \blog\model\Article;
use \blog\model\Meta;
use \blog\libs\Html;
use \blog\libs\Common;
$homeurl = Router::createUrl();
?>
	<div class="mdl-layout__obfuscator"></div>
	<header class="mdl-layout__header">
		<div class="mdl-layout__header-row">
			<?php if ($show_back) { ?>
			<div id="back-button" aria-expanded="false" role="button" tabindex="0" class="mdl-layout__drawer-button"><i class="material-icons">arrow_back</i></div>
			<?php } else { ?>
			<div id="menu-button" aria-expanded="false" role="button" tabindex="0" class="mdl-layout__drawer-button"><i class="material-icons">menu</i></div>
			<?php } ?>
			<span class="mdl-layout-title"><?=Html::encode($title)?></span>
			<div class="mdl-layout-spacer"></div>
			<nav class="mdl-navigation wrapper">
				<span class="mdl-navigation__link">
					<a class="mdl-button mdl-button--icon hide-on-mobile" href="https://www.sylingd.com/about.html" target="_blank"><i class="material-icons">person</i></a>
					<a class="mdl-button mdl-button--icon hide-on-mobile" href="http://search.sylingd.com" rel="nofollow" target="_blank"><i class="material-icons">search</i></a>
					<button id="mobile_nav_button" class="mdl-button mdl-button--icon hide-on-desktop"><i class="material-icons">more_vert</i></button>
				</span>
				<ul id="mobile_nav" class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="mobile_nav_button">
					<li class="mdl-menu__item"><a href="https://www.sylingd.com/about.html" target="_blank"><i class="material-icons">person</i>关于</a></li>
					<li class="mdl-menu__item"><a href="http://search.sylingd.com" rel="nofollow" target="_blank"><i class="material-icons">search</i>搜索</a></li>
				</ul>
			</nav>
		</div>
	</header>
	<?php if (!$show_back) { ?>
	<div class="menu mdl-layout__drawer">
		<span class="mdl-layout-title"><p><img src="https://tp3.sinaimg.cn/2708167970/180/40105821301/1"></p><p>泷涯</p></span>
		<nav class="mdl-navigation">
			<a class="mdl-navigation__link" href="https://www.sylingd.com">首页</a>
			<a class="mdl-navigation__link" href="<?=$homeurl?>">博客</a>
			<?php
			$m = Meta::getList(['type' => 1]);
			while ($one = $m->next()) {
				echo '<a class="mdl-navigation__link" href="' , Router::createUrl(['index/article/list', 'type' => 'id', 'val' => $one->id, 'page' => 1]), '">';
				$one->title();
				echo '</a>';
			}
			?>
		</nav>
	</div>
	<?php } ?>